# Maintainer: Patrycja Rosa <alpine@ptrcnull.me>
pkgname=py3-requests-wsgi-adapter
pkgver=0.4.1
pkgrel=1
# upstream does not tag releases on git:
# https://github.com/seanbrant/requests-wsgi-adapter/issues/20
_gitrev=5b771effb5414096089375a3a36a3e7af1522ae0
pkgdesc="WSGI Transport Adapter for Requests"
url="https://pypi.org/project/requests-wsgi-adapter/"
arch="noarch"
license="BSD-3-Clause"
depends="py3-requests"
checkdepends="py3-pytest"
makedepends="py3-gpep517 py3-installer py3-setuptools py3-wheel"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/seanbrant/requests-wsgi-adapter/archive/$_gitrev.tar.gz"
builddir="$srcdir/requests-wsgi-adapter-$_gitrev"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 runtests.py
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
f5f3572586f3a4cba98bcebfec2a77382e101fb799998007ad37f804ec721533ccb84bb7cc4f7ee8cf2fe9e61e75440b75003e88d384c44a6484acc65bfa3626  py3-requests-wsgi-adapter-0.4.1.tar.gz
"
